/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 26727
 * Date: 2024-03-03
 * Time: 13:26
 */
class Message<T> {
    private T message;

    public T getMessage() {
        return message;
    }

    public void setMessage(T message) {
        this.message = message;
    }
}

public class Test {

    public static void main(String[] args) {
        Message<String> message = new Message<>();
        message.setMessage("欢迎你");
        func(message);

        Message<Integer> message1 = new Message<>();
        message1.setMessage(111);
        func(message1);
    }

    public static void func(Message<?> tmp) {
        System.out.println(tmp.getMessage());
    }
}
